package com.zxjbyte.yiyi.extension.monitor.domain.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.List;
import java.util.Properties;

/**
 * @Author zhangxingjia
 * @Date 2024/7/3 10:32
 * @Version: 1.0
 */
@Data
@Accessors(chain = false)
@Schema(description = "Redis信息响应结构体")
public class RedisInfoVO {

    @Schema(description = "Redis info指令结果")
    private Properties info;

    @Schema(description = "Redis key数量")
    private Long dbSize;

    @Schema(description = "Redis命令统计信息")
    private List<CommandStat> commandStats;

    @Getter
    @Setter
    public static class CommandStat{

        @Schema(description = "Redis命令")
        private String command;

        @Schema(description = "调用次数")
        private Long calls;

        @Schema(description = "消耗CPU秒数")
        private Long usec;
    }
}
